-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ceilf16
and ceilf128
#436
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tgross35
force-pushed
the
generic-ceil
branch
3 times, most recently
from
January 13, 2025 12:15
a809ed4
to
21c19b5
Compare
i386 should probably get an asm implementation for |
tgross35
force-pushed
the
generic-ceil
branch
3 times, most recently
from
January 22, 2025 07:08
f56c40f
to
5cfb028
Compare
This may allow for small optimizations with larger float types since `u32` math can be used after shifting. LLVM may be already getting this anyway.
tgross35
force-pushed
the
generic-ceil
branch
2 times, most recently
from
January 22, 2025 07:12
b25aa4b
to
94581b5
Compare
`exp` does not perform any form of unbiasing, so there isn't any reason it should be signed. Change this. Additionally, add `EPSILON` to the `Float` trait.
tgross35
force-pushed
the
generic-ceil
branch
2 times, most recently
from
January 22, 2025 07:20
060274d
to
2938a7a
Compare
Additionally, make use of this version to implement `ceil` and `ceilf`. Musl's `ceilf` algorithm seems to work better for all versions of the functions. Testing with a generic version of musl's `ceil` routine showed the following regressions: icount::icount_bench_ceil_group::icount_bench_ceil logspace:setup_ceil() Performance has regressed: Instructions (14064 > 13171) regressed by +6.78005% (>+5.00000) Baselines: softfloat|softfloat Instructions: 14064|13171 (+6.78005%) [+1.06780x] L1 Hits: 16697|15803 (+5.65715%) [+1.05657x] L2 Hits: 0|0 (No change) RAM Hits: 7|8 (-12.5000%) [-1.14286x] Total read+write: 16704|15811 (+5.64797%) [+1.05648x] Estimated Cycles: 16942|16083 (+5.34104%) [+1.05341x] icount::icount_bench_ceilf_group::icount_bench_ceilf logspace:setup_ceilf() Performance has regressed: Instructions (14732 > 9901) regressed by +48.7931% (>+5.00000) Baselines: softfloat|softfloat Instructions: 14732|9901 (+48.7931%) [+1.48793x] L1 Hits: 17494|12611 (+38.7202%) [+1.38720x] L2 Hits: 0|0 (No change) RAM Hits: 6|6 (No change) Total read+write: 17500|12617 (+38.7018%) [+1.38702x] Estimated Cycles: 17704|12821 (+38.0860%) [+1.38086x]
Use the generic algorithms to provide implementations for these routines.
tgross35
force-pushed
the
generic-ceil
branch
from
January 22, 2025 07:22
2938a7a
to
a836f6e
Compare
Current results, this algorithm shows an improvement:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a generic version of
ceil
. Additionally, make use of this version to implementceil
andceilf
.Musl's
ceilf
algorithm seems to work better for all versions of the functions. Testing with a generic version of musl'sceil
routine showed the following regressions:Add
ceilf16
andceilf128
Use the generic algorithms to provide implementations for these routines.